<?php
namespace Home\Controller;
use Think\Controller;
class IndexController extends Controller {
    public function index(){
		$this->display();
    }
	public function article(){
		$where['id'] = $_GET['cate'];
		$cou['article_id'] = $_GET['cate'];
		$info = D('Article')->where($where)->find();
		$click = D('Article')->where($where)->setinc('click',1);
		$count = D('Comment')->where($cou)->count();
		$this->assign('article',$info);
		$this->assign('count',$count);
		$this->display();
		}
	public function artype(){
		$where['typeid'] = $_GET['cate'];
		$info = D('Article')->where($where)->select();
		$this->assign('show',$info);
		$id = $_GET['cate'];
		$typename = D('Artype')->where("id  = '$id' ")->find();
		$this->assign('tn',$typename);
		$this->display();
		}
	
	public function goodslist(){
		$where['typeid'] = $_GET['cate'];
		$info = D('Goods')->where($where)->select();
		$this->assign('show',$info);
		$id = $_GET['cate'];
		$typename = D('Artype')->where("id  = '$id' ")->find();
		$this->assign('tn',$typename);
		$this->display();
		
		}
	public function goods(){
		$where['id'] = $_GET['cate'];
		$cou['goods_id'] = $_GET['cate'];
		$info = D('Goods')->where($where)->find();
		$this->assign('goods',$info);
		$this->display();
		}
	public function page(){
		$where['id'] = $_GET['cate'];
		$info = D('Artype')->where($where)->find();
		$this->assign('pi',$info);
		$this->display();
		}
}